#pragma once
#include "basicclass.h"
#include "StdAfx.h"

struct HMapVERTEX
{
	D3DXVECTOR3	Pos;
	D3DXVECTOR3	Nor;
	D3DXVECTOR2	Tex;

	enum FVF
	{
		FVF = ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 )
	};
};

struct HMapINDEX
{
    WORD	_0 , _1 , _2;    
};

class CHightMap :
	public CBasicClass
{
public:
    LPDIRECT3DVERTEXBUFFER9		m_pVB;
	LPDIRECT3DINDEXBUFFER9		m_pIB;
	LPDIRECT3DTEXTURE9			m_pTexHightMap;
	LPDIRECT3DTEXTURE9			m_pTexDiffuse;

	DWORD						m_dwHeightX;
	DWORD						m_dwHeightZ;

public:
	bool						Init();
	bool						Frame();
	bool						Render();
	bool						Release();

	bool						LoadTexture();
	bool						CreateVB();
	bool						CreateIB();

public:
	CHightMap(void);
	~CHightMap(void);
};
